<!-- YouTubeList-->

<%@ page import="eudjok.YouTube" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'youTube.label', default: 'YouTube')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    
	<body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
		
        <div class="body">
            <h1><g:message code="default.list.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
				<div class="message">${flash.message}</div>
            </g:if>
        
			<div class="list">
				<table>
					<thead>
						<tr>
						
							<g:sortableColumn property="videoId" title="${message(code: 'youTube.videoId.label', default: 'VideoId')}" />
							
							<g:sortableColumn property="title" title="${message(code: 'youTube.title.label', default: 'Titulo')}" />
													
							<g:sortableColumn property="description" title="${message(code: 'youTube.description.label', default: 'Descricao')}" />
						
							<g:sortableColumn property="webPlayerUrl" title="${message(code: 'youTube.webPlayerUrl.label', default: 'WebPlayerUrl')}" />
						
							<g:sortableColumn property="user" title="${message(code: 'youTube.user.label', default: 'User')}" />
													
						</tr>
					</thead>
					
					<tbody>
					<g:each in="${youTubeInstanceList}" status="i" var="youTubeInstance">
						<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
							<td><g:link action="show" videoId="${youTubeInstance.videoId}">${fieldValue(bean: youTubeInstance, field: "videoId")}</g:link></td>
						
							<td><g:link action="show" videoId="${youTubeInstance.videoId}"> ${fieldValue(bean: youTubeInstance, field: "title")}</g:link></td>
						
							<td>${fieldValue(bean: youTubeInstance, field: "description")}</td>
						
							<td>${fieldValue(bean: youTubeInstance, field: "webPlayerUrl")}</td>
						
							<td>${fieldValue(bean: youTubeInstance, field: "user")}</td>
						</tr>
					</g:each>
					
					</tbody>
				</table>
			</div>
							
		</div>
    </body>
</html>
